//
//  MCHeaderCell.m
//  MCModify
//
//  Created by 陆绍波 on 2018/11/15.
//  Copyright © 2018 陆绍波. All rights reserved.
//

#import "MCHeaderCell.h"
#import <Masonry.h>
@interface MCHeaderCell()
@property(nonatomic,strong) UIImageView *photoView;
@end

@implementation MCHeaderCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self = [super initWithFrame:frame]) {
        [self setup];
    }
    return self;
}

- (void)setup{
    _photoView = [[UIImageView alloc]init];
    [self addSubview:_photoView];
    _photoView.contentMode = UIViewContentModeScaleAspectFill;
    [_photoView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(UIEdgeInsetsZero);
    }];
    _photoView.layer.masksToBounds = true;
}
- (void)setModel:(MCHeaderModel *)model{
    _model = model;
    _photoView.image = model.image;
}
@end
